// 定义路由表
// 使用@路径别名报错
import Home from '@/views/Home';
import Login from '@/views/Login';
import Car from '@/views/Car';
import { Navigate } from 'react-router-dom';
import Detail from '@/views/Detail';
const routes = [
    {
        path: '/home',
        element: <Home></Home>
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/car',
        element: <Car></Car>
    },
    {
        path: '/detail/:proid',
        element: <Detail></Detail>
    },
    {
        path: '/',
        element: <Navigate to='/home'></Navigate>
    }

]

export default routes